package cn.zsb.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;

public class User implements Serializable {
    private long id;
    private String sname;
    private String school;
    private String major;
    private String type;
    private Boolean isgraduate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date addtime;
    private String openid;
    private String phone;
    private String sex;
    private String addr;
    private String pass;

    private int []likes=new int[0];

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int[] getLikes() {
        return likes;
    }

    public void setLikes(int[] likes) {
        this.likes = likes;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Boolean getIsgraduate() {
        return isgraduate;
    }

    public void setIsgraduate(Boolean isgraduate) {
        this.isgraduate = isgraduate;
    }

    public Date getAddtime() {
        return addtime;
    }

    public void setAddtime(Date addtime) {
        this.addtime = addtime;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", sname='" + sname + '\'' +
                ", school='" + school + '\'' +
                ", major='" + major + '\'' +
                ", type='" + type + '\'' +
                ", isgraduate=" + isgraduate +
                ", addtime=" + addtime +
                ", openid='" + openid + '\'' +
                ", phone='" + phone + '\'' +
                ", sex='" + sex + '\'' +
                ", addr='" + addr + '\'' +
                ", pass='" + pass + '\'' +
                ", 爱好='" + Arrays.toString(likes) + '\'' +
                '}';
    }
}
